package com.databaseManager;
import java.sql.Connection;

public class test extends DatabaseManager{
    public static void main(String[] args) throws Exception {
        //测试数据库连接
        System.out.println("连接数据库中...");
        Connection myConn = getConnection();
        System.out.println("数据库已连接， 关闭连接中...");
        closeAll(myConn, null, null);
        System.out.println("连接已关闭...");

        //创建数据库操作接口实例
        DatabaseFunc df = new DatabaseFunc();

        /*Record r = new Record("r12345677654321", "123456789987654321", "987654321123456789", "2019.11.19",
                "正常", "初诊", "2019.11.19", "无", "无", "无");*/
        //df.insertRecord(r);

        String[] cheIds = new String[] {"111222333444555666", "666555444333222111"};
        String[] cheNames = new String[] {"xt", "wj"};
        Checkment c = new Checkment("201912121234001", "111222333444555666", "123123123123123123", cheIds, cheNames);
        //df.insertApply(c);
        /*Patient p = df.findPatient("123456789987654321");
        Doctor d = df.findDoctor("987654321123456789");
        List<Doctor> professor = df.searchProfessorByDepName("口腔科");*/

        //ProOrder proOrder = new ProOrder(1, "123456789987654321", "2019.11.19 19:00:00", professor.get(0).getUid());
        //DepOrder depOrder = new DepOrder(2,"123456789987654321", "2019.11.19 19:00:01",  df.findDepartment("耳鼻喉科", SqlOP.GETDEPNO));
        //df.insertDepOrder(depOrder);
        //df.insertProOrder(proOrder);

        //Order o = df.findOrder("123456789987654321");
        //df.insertLiveNum(1, "123456789987654321", df.findDepartment("耳鼻喉科", SqlOP.GETDEPNO), SqlOP.INSERT_LIVENUM_DEP);
        //df.insertLiveNum(2, "123123123123123123", professor.get(0).getUid(), SqlOP.INSERT_LIVENUM_PRO);
        //QueueNumber q1 = df.findQueueNumber(1);
        //QueueNumber q2 = df.findQueueNumber(2);
        //QueueNumber q3 = df.findQueueNumber(3);
        //QueueNumber q4 = df.findQueueNumber(4);
        Doctor d = df.findDoctor("111222333444555666");

    }
}
